<?php
header('Content-type:text/html;charset=utf8');
/**
 * xysc users Version1.0
 * ==================================
 * Copy 2016-2017
 * Web:www.xjh7.com
 * ==================================
 * Author:xjh
 * Date:2016-3-1
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet"  href="<?php echo backweb_CSS_URL;?>index.css" />
<link rel="stylesheet"  href="<?php echo backweb_CSS_URL;?>common.css" />
<script>

function centerWindow(url,name,width,height){
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2 - 50;
	window.open(url, name, 'width='+width+',height='+height+',top='+top+',left='+left);
}

</script>
</head>
<body>
	<div class="place" >
	<span>位置：</span>
		<ul class="placeul">
			<li><a href="#">首页</a></li>
			<li><a href="./index.php?r=backweb/brand/brandTop">品牌列表</a></li>
			<li><a href="#">修改品牌</a></li>
		</ul>
	</div>
	<table class="list_table mt10">
		<form method="post" name="fm" action="./index.php?r=backweb/brand/brandupd&brand_id=<?php echo $info['brand_id'];?>">
			 <tr>
				 <td class="td_center wh100">品牌名称：　</td>
				 <td>
				     <input type="text" name="brand_name" class="input-text"  value="<?php echo $info['brand_name'];?>" />
				 </td>		
			  </tr>
			  <tr>
				 <td class="td_center wh100">品牌网址：</td>
				 <td>
					 <input type="text"  name="brand_url"  value="<?php echo $info['brand_url'];?>" class="input-text"   />
				 </td>		
			  </tr>
			  <tr>
				 <td class="td_center wh100">品牌logo地址：</td>
				 <td>
					<input type="text" name="brand_thumbnail_url" value="<?php echo $info['brand_thumbnail_url'];?>"  class="input-text" style="width:400px;"  readonly="readonly" /> 
					<input type="button" value="上传缩略图"  onclick="centerWindow('./index.php?r=backweb/brand/thumbnail','upfile','400','100')" class="ml20 h25 w80 bgcolorace7ff cu" style="border:1px solid #ccc;" />(规格必须为140*80px)
					<img name="pic" style="display:none;" /> 
					</td>		
			  </tr>	
			  <tr>
				 <td class="td_center wh100">品牌简介：</td>
				 <td>
				     <textarea rows="3"  cols="25" class="input-text wh500" name="brand_info" ><?php echo $info['brand_info'];?></textarea>
				 </td>		
			  </tr>	
			  <tr>
				 <td class="td_center wh100">排序：</td>
				 <td>
					 <input type="text" name="brand_sort"  value="<?php echo $info['brand_sort'];?>" class="text sort" style="border:1px solid #ccc;width:40px;"   />
				 </td>		
			  </tr>
			  <tr>
		  			<td class="td_center wh100">分类：</td>　　
		  			<td>
	  					<select name="category_id" class="select">
							<?php foreach($infos as $_v){ ?>
							<option value="<?php echo $_v['category_id'];?>" <?php if($_v['category_id'] == $info['category_id']) echo "selected='selected'";?> ><?php echo $_v['category_name'];?></option>
							<?php }?>
						</select>
					</td>
			  </tr>
			  <tr>
				<td class="td_center wh100">是否封面：</td>
				<td> 
					<input type="radio" name="brand_cover" value="1" <?php if($info['brand_cover'] == 1) echo "checked='checked'"?>  />是
				    <input type="radio" name="brand_cover" value="0"  <?php if($info['brand_cover'] == 0) echo "checked='checked'"?> />否
				</td>
			</tr>
		  	<tr>
				<td class="td_center wh100">是否可用：</td>
				<td> 
					<input type="radio" name="active" value="1" <?php if($info['active'] == 1) echo "checked='checked'"?>  />是
				    <input type="radio" name="active" value="0"  <?php if($info['active'] == 0) echo "checked='checked'"?> />否
				</td>
			</tr>
			<tr>
				 <td class="td_center">
				    <input type="submit" name="send" id="btsave" value="修改" class="btn btn82 btn_save ml25" />				
				 </td>
				 <td>
				   <input type="reset" value="重置" class="btn btn82 btn_res ml10" />
				</td>
			 </tr>
			</form>
	</table>
		<div id="info" style="height:25px;margin:0 auto;">
							    <p>版权所有 © 20016-2017 xjh&lj，并保留所有权利。</p>
		</div>
</body>
</html>